package com.zz.spring6.validator.three;


import com.zz.spring6.validator.three.a.ValidatorConfig1;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestUser {

    public static void main(String[] args) {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(ValidatorConfig1.class);
        MyService service = context.getBean(MyService.class);
        User user = new User();
        user.setName("zz");
        user.setPhone("123");
        user.setAge(20);
        service.testMethod(user);

    }

}
